package com.neusoft.neuiotms.dcam.fixed.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.neusoft.bizcore.web.dto.result.PageResultDTO;
import com.neusoft.bizcore.web.support.Searchable;
import com.neusoft.neuiotms.dcam.fixed.dto.WarehouseRecordDTO;
import com.neusoft.neuiotms.dcam.fixed.service.WarehouseRecordService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Api(tags = "库房记录")
@RestController
@RequestMapping(value = "/api/w/fixed/storehouse/records")
public class WarehouseRecordController {
    @Autowired
    private WarehouseRecordService warehouseRecordService;

    @ApiOperation("分页查询库房记录")
    @GetMapping("/p")
    public PageResultDTO<WarehouseRecordDTO> search(final Pageable pageable, final Searchable searchable) {
        return PageResultDTO.success(this.warehouseRecordService.search(pageable, searchable));
    }

}
